home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import flash.display.DisplayObjectContainer;
- import flash.display.Sprite;
- import flash.events.Event;
-
- public class WorldManager extends Sprite
- {
-
-
- internal const HEIGHTBG1:* = 50;
-
- internal const HEIGHTBG2:* = 133.33333333333334;
-
- internal const HEIGHTBG3:* = 133.33333333333334;
-
- internal const HEIGHTBG4:* = 100;
-
- internal const HEIGHTBG5:* = 266.6666666666667;
-
- internal const HEIGHTBG6:* = 400;
-
- internal const LEVELCHANGE:* = 50;
-
- internal const DOC_HEIGHT:* = 400;
-
- internal const BRDR_TOP:* = 0;
-
- private var §\x01\x01\x03\x06§:* = null;
-
- private var §\x01\x01\x03\x07§:DisplayObjectContainer;
-
- private var §\x01\x01\x03\b§:DisplayObjectContainer;
-
- private var §\x01\x01\x03\x0b§:* = null;
-
- internal const BRDR_BOTTOM:* = 400;
-
- private var §\x01\x01\x03\f§:* = null;
-
- private var §\x01\x01\x03\r§:* = null;
-
- private var §\x01\x01\x03\x0e§:*;
-
- private var §\x01\x01\x03\x0f§:* = null;
-
- internal const BRDR_LEFT:* = 0;
-
- private var §\x01\x01\x03\x10§:* = null;
-
- private var §\x01\x01\x04\x01§:* = null;
-
- internal const DOC_LEFT:* = 0;
-
- private var §\x01\x01\x04\x03§:* = null;
-
- private var §\x01\x01\x04\x04§:* = null;
-
- private var §\x01\x01\x04\x05§:* = null;
-
- private var §\x01\x01\x02\t§:*;
-
- private var §\x01\x01\x04\x06§:* = null;
-
- private var §\x01\x01\x04\x07§:* = null;
-
- internal const WIDTHBG1:* = 640;
-
- internal const WIDTHBG4:* = 640;
-
- internal const WIDTHBG5:* = 640;
-
- internal const WIDTHBG6:* = 640;
-
- internal const WIDTHBG2:* = 640;
-
- internal const WIDTHBG3:* = 640;
-
- private var §\x01\x01\x04\b§:* = null;
-
- internal const TOPBG1:* = 350;
-
- internal const TOPBG2:* = 253.33333333333331;
-
- internal const TOPBG3:* = 213.33333333333334;
-
- internal const TOPBG4:* = -50;
-
- internal const TOPBG6:* = 0;
-
- private var §\x01\x01\x04\t§:* = null;
-
- private var §\x01\x01\x04\n§:* = null;
-
- internal const BRDR_RIGHT:* = 640;
-
- private var §\x01\x01\x04\x0b§:DisplayObjectContainer;
-
- internal const DOC_TOP:* = 0;
-
- internal const TOPBG5:* = DOC_TOP + DOC_HEIGHT * 5 / 20;
-
- private var §\x01\x01\x04\f§:DisplayObjectContainer;
-
- private var §\x01\x01\x04\x0e§:Boolean = false;
-
- internal const DOC_WIDTH:* = 640;
-
- internal const FRONTSCROLLSPEED:* = 10;
-
- private var §\x01\x01\x04\x10§:* = null;
-
- private var §\x01\x01\x05\x01§:int = 0;
-
- internal const SCROLLSPEED1:* = 10;
-
- internal const SCROLLSPEED3:* = 7;
-
- internal const SCROLLSPEED4:* = 2;
-
- internal const SCROLLSPEED5:* = 1;
-
- internal const SCROLLSPEED6:* = 0;
-
- internal const SCROLLSPEED2:* = 9;
-
- public function WorldManager(param1:*, param2:*)
- {
- §\x01\x01\x04\x0e§ = false;
- §\x01\x01\x03\r§ = null;
- §\x01\x01\x03\f§ = null;
- §\x01\x01\x03\x10§ = null;
- §\x01\x01\x04\x01§ = null;
- §\x01\x01\x04\x04§ = null;
- §\x01\x01\x04\x05§ = null;
- §\x01\x01\x03\x0f§ = null;
- §\x01\x01\x04\x03§ = null;
- §\x01\x01\x03\x06§ = null;
- §\x01\x01\x03\x0b§ = null;
- §\x01\x01\x04\x06§ = null;
- §\x01\x01\x04\x07§ = null;
- §\x01\x01\x04\n§ = null;
- §\x01\x01\x04\b§ = null;
- §\x01\x01\x04\t§ = null;
- §\x01\x01\x04\x10§ = null;
- §\x01\x01\x05\x01§ = 0;
- super();
- §\x01\x01\x02\t§ = param1;
- §\x01\x01\x03\x0e§ = param2;
- §\x01\x01\x04\x0b§ = new Sprite();
- §\x01\x01\x02\t§.addChild(§\x01\x01\x04\x0b§);
- §\x01\x01\x03\b§ = new Sprite();
- §\x01\x01\x02\t§.addChild(§\x01\x01\x03\b§);
- §\x01\x01\x03\x07§ = new Sprite();
- §\x01\x01\x02\t§.addChild(§\x01\x01\x03\x07§);
- §\x01\x01\x04\f§ = new Sprite();
- §\x01\x01\x02\t§.addChild(§\x01\x01\x04\f§);
- }
-
- private function §\x01\x01\x03\x04§() : *
- {
- if(§\x01\x01\x03\r§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x03\r§);
- §\x01\x01\x03\r§ = null;
- }
- if(§\x01\x01\x03\f§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x03\f§);
- §\x01\x01\x03\f§ = null;
- }
- if(§\x01\x01\x03\x10§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x03\x10§);
- §\x01\x01\x03\x10§ = null;
- }
- if(§\x01\x01\x04\x01§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\x01§);
- §\x01\x01\x04\x01§ = null;
- }
- if(§\x01\x01\x04\x04§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\x04§);
- §\x01\x01\x04\x04§ = null;
- }
- if(§\x01\x01\x04\x05§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\x05§);
- §\x01\x01\x04\x05§ = null;
- }
- if(§\x01\x01\x03\x0f§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x03\x0f§);
- §\x01\x01\x03\x0f§ = null;
- }
- if(§\x01\x01\x04\x03§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\x03§);
- §\x01\x01\x04\x03§ = null;
- }
- if(§\x01\x01\x03\x06§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x03\x06§);
- §\x01\x01\x03\x06§ = null;
- }
- if(§\x01\x01\x03\x0b§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x03\x0b§);
- §\x01\x01\x03\x0b§ = null;
- }
- if(§\x01\x01\x04\x06§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\x06§);
- §\x01\x01\x04\x06§ = null;
- }
- if(§\x01\x01\x04\x07§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\x07§);
- §\x01\x01\x04\x07§ = null;
- }
- if(§\x01\x01\x04\n§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\n§);
- §\x01\x01\x04\n§ = null;
- }
- if(§\x01\x01\x04\b§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\b§);
- §\x01\x01\x04\b§ = null;
- }
- if(§\x01\x01\x04\t§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\t§);
- §\x01\x01\x04\t§ = null;
- }
- if(§\x01\x01\x04\x10§)
- {
- §\x01\x01\x04\x0b§.removeChild(§\x01\x01\x04\x10§);
- §\x01\x01\x04\x10§ = null;
- }
- }
-
- public function GetSceneContainer() : DisplayObjectContainer
- {
- return §\x01\x01\x03\b§;
- }
-
- private function §\x01\x01\x03\x05§() : *
- {
- }
-
- private function §\x01\x01\x03\t§() : *
- {
- }
-
- private function §\x01\x01\x03\n§() : *
- {
- }
-
- public function GetMenuContainer() : DisplayObjectContainer
- {
- return §\x01\x01\x04\f§;
- }
-
- private function §\x01\x01\x04\x02§() : *
- {
- if(§\x01\x01\x03\r§.x < -WIDTHBG1 + 1)
- {
- §\x01\x01\x03\r§.x = §\x01\x01\x03\f§.x + WIDTHBG1 - SCROLLSPEED1;
- §\x01\x01\x03\f§.x -= SCROLLSPEED1;
- }
- else if(§\x01\x01\x03\f§.x < -WIDTHBG1 + 1)
- {
- §\x01\x01\x03\f§.x = §\x01\x01\x03\r§.x + WIDTHBG1 - SCROLLSPEED1;
- §\x01\x01\x03\r§.x -= SCROLLSPEED1;
- }
- else
- {
- §\x01\x01\x03\r§.x -= SCROLLSPEED1;
- §\x01\x01\x03\f§.x -= SCROLLSPEED1;
- }
- if(§\x01\x01\x03\x10§.x < -WIDTHBG2 + 1)
- {
- §\x01\x01\x03\x10§.x = §\x01\x01\x04\x01§.x + WIDTHBG2 - SCROLLSPEED2;
- §\x01\x01\x04\x01§.x -= SCROLLSPEED2;
- §\x01\x01\x03\x0f§.x = §\x01\x01\x04\x03§.x + WIDTHBG2 - SCROLLSPEED2;
- §\x01\x01\x04\x03§.x -= SCROLLSPEED2;
- }
- else if(§\x01\x01\x04\x01§.x < -WIDTHBG2 + 2)
- {
- §\x01\x01\x04\x01§.x = §\x01\x01\x03\x10§.x + WIDTHBG2 - SCROLLSPEED2;
- §\x01\x01\x03\x10§.x -= SCROLLSPEED2;
- §\x01\x01\x04\x03§.x = §\x01\x01\x03\x0f§.x + WIDTHBG2 - SCROLLSPEED2;
- §\x01\x01\x03\x0f§.x -= SCROLLSPEED2;
- }
- else
- {
- §\x01\x01\x03\x10§.x -= SCROLLSPEED2;
- §\x01\x01\x04\x01§.x -= SCROLLSPEED2;
- §\x01\x01\x03\x0f§.x -= SCROLLSPEED2;
- §\x01\x01\x04\x03§.x -= SCROLLSPEED2;
- }
- if(§\x01\x01\x04\x04§.x < -WIDTHBG3 + 1)
- {
- §\x01\x01\x04\x04§.x = §\x01\x01\x04\x05§.x + WIDTHBG3 - SCROLLSPEED3 - 2;
- §\x01\x01\x04\x05§.x -= SCROLLSPEED3;
- §\x01\x01\x03\x06§.x = §\x01\x01\x03\x0b§.x + WIDTHBG3 - SCROLLSPEED3 - 2;
- §\x01\x01\x03\x0b§.x -= SCROLLSPEED3;
- }
- else if(§\x01\x01\x04\x05§.x < -WIDTHBG3 + 1)
- {
- §\x01\x01\x04\x05§.x = §\x01\x01\x04\x04§.x + WIDTHBG3 - SCROLLSPEED3 - 2;
- §\x01\x01\x04\x04§.x -= SCROLLSPEED3;
- §\x01\x01\x03\x0b§.x = §\x01\x01\x03\x06§.x + WIDTHBG3 - SCROLLSPEED3 - 2;
- §\x01\x01\x03\x06§.x -= SCROLLSPEED3;
- }
- else
- {
- §\x01\x01\x04\x04§.x -= SCROLLSPEED3;
- §\x01\x01\x04\x05§.x -= SCROLLSPEED3;
- §\x01\x01\x03\x06§.x -= SCROLLSPEED3;
- §\x01\x01\x03\x0b§.x -= SCROLLSPEED3;
- }
- if(§\x01\x01\x04\x06§.x < -WIDTHBG4 + 1)
- {
- §\x01\x01\x04\x06§.x = §\x01\x01\x04\x07§.x + WIDTHBG4 - SCROLLSPEED4;
- §\x01\x01\x04\x07§.x -= SCROLLSPEED4;
- }
- else if(§\x01\x01\x04\x07§.x < -WIDTHBG4 + 2)
- {
- §\x01\x01\x04\x07§.x = §\x01\x01\x04\x06§.x + WIDTHBG4 - SCROLLSPEED4;
- §\x01\x01\x04\x06§.x -= SCROLLSPEED4;
- }
- else
- {
- §\x01\x01\x04\x06§.x -= SCROLLSPEED4;
- §\x01\x01\x04\x07§.x -= SCROLLSPEED4;
- }
- if(§\x01\x01\x04\n§.x < -WIDTHBG5 + 1)
- {
- §\x01\x01\x04\n§.x = §\x01\x01\x04\b§.x + WIDTHBG5 - SCROLLSPEED5 - 1;
- §\x01\x01\x04\b§.x -= SCROLLSPEED5;
- }
- else if(§\x01\x01\x04\b§.x < -WIDTHBG5 + 1)
- {
- §\x01\x01\x04\b§.x = §\x01\x01\x04\n§.x + WIDTHBG5 - SCROLLSPEED5 - 1;
- §\x01\x01\x04\n§.x -= SCROLLSPEED5;
- }
- else
- {
- §\x01\x01\x04\n§.x -= SCROLLSPEED5;
- §\x01\x01\x04\b§.x -= SCROLLSPEED5;
- }
- if(§\x01\x01\x03\x0e§.GetPercentDone() == 50)
- {
- §\x01\x01\x03\x10§.visible = false;
- §\x01\x01\x03\x0f§.visible = true;
- §\x01\x01\x04\x01§.visible = false;
- §\x01\x01\x04\x03§.visible = true;
- §\x01\x01\x04\x04§.visible = false;
- §\x01\x01\x03\x06§.visible = true;
- §\x01\x01\x04\x05§.visible = false;
- §\x01\x01\x03\x0b§.visible = true;
- §\x01\x01\x04\t§.visible = false;
- §\x01\x01\x04\x10§.visible = true;
- }
- }
-
- public function GetFrontScrollSpeed() : int
- {
- return FRONTSCROLLSPEED;
- }
-
- public function StopGame() : *
- {
- §\x01\x01\x03\x04§();
- §\x01\x01\x03\t§();
- §\x01\x01\x02\t§.removeEventListener(Event.ENTER_FRAME,§\x01\x01\x04\r§);
- }
-
- public function StartGame() : *
- {
- §\x01\x01\x04\x0f§();
- §\x01\x01\x03\x05§();
- §\x01\x01\x05\x01§ = 0;
- §\x01\x01\x02\t§.addEventListener(Event.ENTER_FRAME,§\x01\x01\x04\r§,false,0,true);
- }
-
- public function §\x01\x01\x04\r§(param1:Event) : *
- {
- if(!§\x01\x01\x04\x0e§)
- {
- §\x01\x01\x04\x02§();
- §\x01\x01\x03\n§();
- }
- }
-
- private function §\x01\x01\x04\x0f§() : *
- {
- §\x01\x01\x03\x04§();
- §\x01\x01\x03\r§ = new bg1();
- §\x01\x01\x03\f§ = new bg1();
- §\x01\x01\x03\x10§ = new bg2();
- §\x01\x01\x04\x01§ = new bg2();
- §\x01\x01\x04\x04§ = new bg3();
- §\x01\x01\x04\x05§ = new bg3();
- §\x01\x01\x03\x0f§ = new bg22();
- §\x01\x01\x04\x03§ = new bg22();
- §\x01\x01\x03\x06§ = new bg32();
- §\x01\x01\x03\x0b§ = new bg32();
- §\x01\x01\x04\x06§ = new bg4();
- §\x01\x01\x04\x07§ = new bg4();
- §\x01\x01\x04\n§ = new bg5();
- §\x01\x01\x04\b§ = new bg5();
- §\x01\x01\x04\t§ = new bg6();
- §\x01\x01\x04\x10§ = new bg62();
- §\x01\x01\x03\r§.x = DOC_LEFT;
- §\x01\x01\x03\r§.y = TOPBG1;
- §\x01\x01\x03\r§.height = HEIGHTBG1;
- §\x01\x01\x03\r§.width = WIDTHBG1;
- §\x01\x01\x03\f§.x = DOC_LEFT + WIDTHBG1;
- §\x01\x01\x03\f§.y = TOPBG1;
- §\x01\x01\x03\f§.height = HEIGHTBG1;
- §\x01\x01\x03\f§.width = WIDTHBG1;
- §\x01\x01\x03\x10§.x = DOC_LEFT;
- §\x01\x01\x03\x10§.y = TOPBG2;
- §\x01\x01\x03\x10§.height = HEIGHTBG2;
- §\x01\x01\x03\x10§.width = WIDTHBG2;
- §\x01\x01\x04\x01§.x = DOC_LEFT + WIDTHBG2;
- §\x01\x01\x04\x01§.y = TOPBG2;
- §\x01\x01\x04\x01§.height = HEIGHTBG2;
- §\x01\x01\x04\x01§.width = WIDTHBG2;
- §\x01\x01\x04\x04§.x = DOC_LEFT;
- §\x01\x01\x04\x04§.y = TOPBG3;
- §\x01\x01\x04\x04§.height = HEIGHTBG3;
- §\x01\x01\x04\x04§.width = WIDTHBG3;
- §\x01\x01\x04\x05§.x = DOC_LEFT + WIDTHBG3 - 2;
- §\x01\x01\x04\x05§.y = TOPBG3;
- §\x01\x01\x04\x05§.height = HEIGHTBG3;
- §\x01\x01\x04\x05§.width = WIDTHBG3;
- §\x01\x01\x03\x0f§.x = DOC_LEFT;
- §\x01\x01\x03\x0f§.y = TOPBG2;
- §\x01\x01\x03\x0f§.height = HEIGHTBG2;
- §\x01\x01\x03\x0f§.width = WIDTHBG2;
- §\x01\x01\x03\x0f§.visible = false;
- §\x01\x01\x04\x03§.x = DOC_LEFT + WIDTHBG2;
- §\x01\x01\x04\x03§.y = TOPBG2;
- §\x01\x01\x04\x03§.height = HEIGHTBG2;
- §\x01\x01\x04\x03§.width = WIDTHBG2;
- §\x01\x01\x04\x03§.visible = false;
- §\x01\x01\x03\x06§.x = DOC_LEFT;
- §\x01\x01\x03\x06§.y = TOPBG3;
- §\x01\x01\x03\x06§.height = HEIGHTBG3;
- §\x01\x01\x03\x06§.width = WIDTHBG3;
- §\x01\x01\x03\x06§.visible = false;
- §\x01\x01\x03\x0b§.x = DOC_LEFT + WIDTHBG3 - 2;
- §\x01\x01\x03\x0b§.y = TOPBG3;
- §\x01\x01\x03\x0b§.height = HEIGHTBG3;
- §\x01\x01\x03\x0b§.width = WIDTHBG3;
- §\x01\x01\x03\x0b§.visible = false;
- §\x01\x01\x04\x06§.x = DOC_LEFT;
- §\x01\x01\x04\x06§.y = TOPBG4;
- §\x01\x01\x04\x06§.height = HEIGHTBG4;
- §\x01\x01\x04\x06§.width = WIDTHBG4;
- §\x01\x01\x04\x07§.x = DOC_LEFT + WIDTHBG4;
- §\x01\x01\x04\x07§.y = TOPBG4;
- §\x01\x01\x04\x07§.height = HEIGHTBG4;
- §\x01\x01\x04\x07§.width = WIDTHBG4;
- §\x01\x01\x04\n§.x = DOC_LEFT;
- §\x01\x01\x04\n§.y = TOPBG5;
- §\x01\x01\x04\n§.height = HEIGHTBG5;
- §\x01\x01\x04\n§.width = WIDTHBG5;
- §\x01\x01\x04\b§.x = DOC_LEFT + WIDTHBG5 - 1;
- §\x01\x01\x04\b§.y = TOPBG5;
- §\x01\x01\x04\b§.height = HEIGHTBG5;
- §\x01\x01\x04\b§.width = WIDTHBG5;
- §\x01\x01\x04\t§.x = DOC_LEFT;
- §\x01\x01\x04\t§.y = TOPBG6;
- §\x01\x01\x04\t§.height = HEIGHTBG6;
- §\x01\x01\x04\t§.width = WIDTHBG6;
- §\x01\x01\x04\x10§.x = DOC_LEFT;
- §\x01\x01\x04\x10§.y = TOPBG6;
- §\x01\x01\x04\x10§.height = HEIGHTBG6;
- §\x01\x01\x04\x10§.width = WIDTHBG6;
- §\x01\x01\x04\x10§.visible = false;
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\t§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\x10§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\n§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\b§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\x06§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\x07§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\x04§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\x05§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x03\x06§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x03\x0b§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x03\x10§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\x01§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x03\x0f§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x04\x03§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x03\r§);
- §\x01\x01\x04\x0b§.addChild(§\x01\x01\x03\f§);
- }
- }
- }
-